<template>
  <router-layout>
    <div class="container">
      <div class="header-box">
        <img src="https://gw.alicdn.com/tfs/TB1LfgDTwHqK1RjSZFgXXa7JXXa-1080-535.png" width="100%" alt>
      </div>
      <div class="img-container">
        <!-- <div class="img-box" @click="openLink(1)">
          <img src="https://gw.alicdn.com/tfs/TB1TxERTxYaK1RjSZFnXXa80pXa-504-304.png" width="100%" alt>
        </div>
        <div class="img-box" @click="openLink(2)">
          <img src="https://gw.alicdn.com/tfs/TB1vpkDTCzqK1RjSZFHXXb3CpXa-504-304.png" width="100%" alt>
        </div> -->
        <div class="img-box" @click="openLink(3)">
          <img src="https://gw.alicdn.com/tfs/TB18koHTq6qK1RjSZFmXXX0PFXa-504-304.png" width="100%" alt>
        </div>
        <div class="img-box" @click="openLink(4)">
          <img src="https://gw.alicdn.com/tfs/TB1FcQOTxjaK1RjSZFAXXbdLFXa-504-304.png" width="100%" alt>
        </div>
      </div>
      <div class="equity-box">
        <p class="equity-text">员工权益</p>
        <div class="img-container">
          <div class="img-box img-box2" @click="openLink(8)">
            <img src="https://gw.alicdn.com/tfs/TB1excRTxYaK1RjSZFnXXa80pXa-486-286.png" width="100%" alt>
          </div>
          <div class="img-box img-box2" @click="openLink(5)">
            <img src="https://gw.alicdn.com/tfs/TB1yrwvTwTqK1RjSZPhXXXfOFXa-486-286.png" width="100%" alt>
          </div>
          <div class="img-box img-box2" @click="openLink(6)">
            <img src="https://gw.alicdn.com/tfs/TB1dUsuTzDpK1RjSZFrXXa78VXa-486-286.png" width="100%" alt>
          </div>
          <div class="img-box img-box2" @click="openLink(7)">
            <img src="https://gw.alicdn.com/tfs/TB1V9oGTwHqK1RjSZFEXXcGMXXa-486-286.png" width="100%" alt>
          </div>
        </div>
      </div>
    </div>
  </router-layout>
</template>

<script>
import { getLink_Url } from "@/api/login";
export default {
  name: "EquityHome",
  methods: {
    openLink(e) {
      if (e == 3) {
        this.$router.push({
          path: "/MarryConsolation"
        });
      } else if (e == 4) {
        this.$router.push({
          path: "/BirthConsolation"
        });
      }else if(e==2){
         this.url()
      }else {
        this.$toast("敬请期待");
      }
    },
      async url(){
         let query = Object.assign({});
        let { data } = await getLink_Url(query);
        if (data.status == 100) {
            window.location.href = data.data
        }
    }
  }
};
</script>

<style lang="scss" scoped>
.img-container {
  display: flex;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 5px;
  .img-box {
    width: 50%;
    margin-bottom: 10px;
    padding: 0 5px;
  }
  .img-box2 {
    padding: 0 8px 5px 8px;
  }
}

.equity-text {
  font-size: 14px;
  padding: 0 15px;
  font-weight: 800;
}
</style>

